Skip to content

feat(enterprise): add tenant export bundle#112

Closed
Gracker wants to merge 1 commit into
feature/enterprise-multi-tenant-d5-quota-retentionfrom
feature/enterprise-multi-tenant-d5-tenant-export
Closed

feat(enterprise): add tenant export bundle#112
Gracker wants to merge 1 commit into
feature/enterprise-multi-tenant-d5-quota-retentionfrom
feature/enterprise-multi-tenant-d5-tenant-export

Conversation

@Gracker
Copy link
Copy Markdown
Owner

@Gracker Gracker commented May 8, 2026

Summary

  • add GET /api/export/tenant for tenant-scoped JSON export bundles
  • include tenant identity proof, trace manifests, report HTML/JSON, sessions/runs/turns, memory entries, audit subset, and provider metadata
  • exclude trace file bodies and redact provider secrets / secret-like JSON keys
  • compute stable JSON SHA256 and audit tenant.exported
  • mark enterprise multi-tenant README §0.5.4 complete with implementation notes

Verification

  • cd backend && PATH="$HOME/.nvm/versions/node/v24.15.0/bin:$PATH" npx jest --runInBand --forceExit src/routes/tests/enterpriseTenantExportRoutes.test.ts
  • cd backend && PATH="$HOME/.nvm/versions/node/v24.15.0/bin:$PATH" npx jest --runInBand --forceExit src/routes/tests/enterpriseTenantExportRoutes.test.ts src/routes/tests/enterpriseReportRoutes.test.ts src/services/tests/enterpriseDb.test.ts src/services/tests/enterpriseRepository.test.ts src/services/tests/enterpriseSchema.test.ts
  • cd backend && PATH="$HOME/.nvm/versions/node/v24.15.0/bin:$PATH" npm run typecheck
  • git diff --check
  • cd backend && PATH="$HOME/.nvm/versions/node/v24.15.0/bin:$PATH" npm run test:scene-trace-regression
  • PATH="$HOME/.nvm/versions/node/v24.15.0/bin:$PATH" npm run verify:pr

@Gracker
Copy link
Copy Markdown
Owner Author

Gracker commented May 9, 2026

已通过 commit 67856ec (merge) + 023a84a (frontend rebuild) 合入 main,关闭此 PR。

@Gracker Gracker closed this May 9, 2026
yun571 pushed a commit to yun571/SmartPerfetto that referenced this pull request May 11, 2026
…Gracker#34, Gracker#51, Gracker#70, Gracker#109, Gracker#112)

MemoryRootCauseContract folds eight memory-class Spark ideas into one
graph contract. Five facets, all optional and provenance-tagged so
missing data surfaces explicitly:
- ProcessMemorySnapshot[] for RSS / Swap / mm_event / oomScoreAdj
  (Spark Gracker#11)
- LmkKillEvent[] tying kills to oom_score_adj and reason (Spark Gracker#12)
- DmaBufAllocation[] for DMA / dmabuf / ion / GPU pressure (Spark Gracker#13)
- MemoryExternalArtifact[] for LeakCanary / KOOM / hprof / baseline
  imports (Spark Gracker#51, Gracker#70, Gracker#109, Gracker#112)
- baselineDiff with topContributors[] for the leak baseline diff graph
  (Spark Gracker#34)

Plan: docs/superpowers/spark/plans/14-memory-lmk-dmabuf.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
yun571 pushed a commit to yun571/SmartPerfetto that referenced this pull request May 11, 2026
…racker#34, Gracker#51, Gracker#70, Gracker#109, Gracker#112)

buildMemoryRootCause folds five orthogonal facets (process snapshots,
LMK events, DMA/DMABUF allocations, external artifacts, baseline diff)
into one MemoryRootCauseContract.

baseline.perCategoryBytes is reduced to topContributors[] sorted by
absolute delta so the largest-impact category surfaces first regardless
of sign (Spark Gracker#34 leak baseline diff graph).

Coverage status is computed per facet: LeakCanary external artifacts
flip Spark Gracker#51/Gracker#70/Gracker#109 to implemented; KOOM artifacts flip Spark
Gracker#112; baselineDiff flips Spark Gracker#34. Missing facets remain scaffolded
so the contract honestly records partial coverage.

When every facet is omitted, the contract is marked unsupportedReason
rather than emitting an empty graph that consumers might mistake for
"no memory pressure observed".

Tests: 4 cases covering facet pass-through, topContributors ordering,
LeakCanary status promotion, and unsupported.

Plan: docs/superpowers/spark/plans/14-memory-lmk-dmabuf.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant